<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>点餐系统</title>
<meta name="Keywords" content="点餐系统">
<meta name="Description" content="点餐系统">
<link href="__CSS_ADMIN_PATH__/css.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC_PATH__/fancybox/source/jquery.fancybox.css" rel="stylesheet" type="text/css">
<script src="__JS_PATH__/jquery-1.8.3.js" type="text/javascript"></script>
<script src="__PUBLIC_PATH__/fancybox/source/jquery.fancybox.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('.fancybox').fancybox();
	});
	
	function fancyboxClose(){	
		$.fancybox.close(); 
	}
</script>
</head>
<body>
<script language="javascript">
window.onload=function showtable(){
var tablename=document.getElementById("mytable");
var li=tablename.getElementsByTagName("tr");
var i=0;
for (i=0;i<=li.length-1;i++){
	li[i].style.backgroundColor="#fff";
	li[i].onmouseover=function(){
	this.style.backgroundColor="#f8f4f1";
}
	li[i].onmouseout=function(){
	this.style.backgroundColor="#fff"
}
}
}

/**
* 全选checkbox,注意：标识checkbox id固定为为check_box
* @author Tony
* @param string name 列表check名称,如 uid[]
*/
function selectall(name) {
	if ($("#check_box").attr("checked")=='checked') {
		$("input[name='"+name+"']").attr("checked","checked");
		$('.checkall').attr("checked"=='checked');
	} else {
		$("input[name='"+name+"']").removeAttr("checked");
		$('.checkall').removeAttr("checked");
	}
}
function confirm_delete(){
	if(confirm('确认删除吗？')) $('#myform').submit();
}
function confirmurl(url,str){
	if(confirm(str)){
	 location.href=url;
	}
}
//列表中修改单一数据的各种状态 added by Tony
function fetch_ajax(par,id){
	var imgUrl = '/Public/Admin/images/';
	var statusVal = $('#'+par+id).attr ('status');
	var value = $('#'+par+id).attr ('value');
	if(statusVal == 1){
	var imgName = 'no.gif';
	var status = 0;
	}else{
	var imgName = 'yes.gif';
	var status = 1;
	}
	if(statusVal!=1){
		if(confirm('你确定要改变桌位的状态吗？')){
			$.post('/index.php?g=Admin&m=Table&a=modifStatus',{'id':id,'value':value},function(re){
				if(re == 1){
					$('.tabStatus'+id).attr('status',0).attr('src',imgUrl+'no.gif');
					$('#'+par+id).attr ('status',status);
					$('#'+par+id).attr ('src',imgUrl+imgName);
				}
			});
		}
	}
} 
</script>
